﻿<Controls:SinacorWindow	
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"  
    xmlns:Custom="http://schemas.xceed.com/wpf/xaml/datagrid"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls"
    
    WindowStartupLocation="CenterScreen" 
    WindowState="Maximized" 
    Title="{DynamicResource Bovespa.Contabil.Tooltip.PesquisaHistCCNomeTela}"
	
	x:Class="Sinacor.UI.Bovespa.Contabil.View.SmartClient.PesquisaHistoricosContabilidade"
    ModulePlus="False"
    ModuleId="ORD">

    <Controls:SinacorExpanderContainer>
        <Grid.RowDefinitions>
            <RowDefinition	Height="90"/>
            <RowDefinition	Height="4"/>
            <RowDefinition	Height="*"
							MinHeight="150"/>
        </Grid.RowDefinitions>
        <Controls:SinacorExpander	Header="{DynamicResource Bovespa.Contabil.Label.ExpanderPesquisa}"
									Grid.Row="0"
									TabIndex="5" IsExpanded="True">
            <Grid x:Name="grdPesquisa">
                <Controls:SinacorLabel	HorizontalAlignment="Left"
                          			VerticalAlignment="Top"
                          			Content="{DynamicResource Bovespa.Contabil.Label.PesquisaHistCCCodigo}"
                          			Width="70"
									Margin="0,0,0,0"
                                    HorizontalContentAlignment="Left"/>
                <Controls:SinacorInt32TextBox x:Name="txtCodigo"
                                           Integers="3"
                                          IsFormated="False"      
                                          Width="70"
										HorizontalAlignment="Left"
										VerticalAlignment="Top"
										Margin="0,23,0,0"
										TabIndex="1" Value="{Binding FiltroPesquisa.Codigo, UpdateSourceTrigger=PropertyChanged}"/>
                <Controls:SinacorLabel	HorizontalAlignment="Left"
									VerticalAlignment="Top"
									Content="{DynamicResource Bovespa.Contabil.Label.PesquisaDescricao}"
									Width="65"
									Margin="74,0,0,0"
                                    HorizontalContentAlignment="Left"/>
                <Controls:SinacorTextBox x:Name="txtDescricao"
                                         MaxLength="80"
                                        HorizontalAlignment="Left"
										Margin="74,23,0,0"
										VerticalAlignment="Top"
										Width="765"
										TabIndex="2" Text="{Binding Path=FiltroPesquisa.Descricao}"/>
                <Controls:SinacorButton x:Name="btnPesquisar"	
                                    HorizontalAlignment="Left"
                           			VerticalAlignment="Top"
                           			Content="{DynamicResource Bovespa.Contabil.Label.BotaoPesquisar}"
                           			Width="100"
                           			Margin="845,23,0,0"
									IsDefault="True"
									ToolTip="{DynamicResource Bovespa.Contabil.Label.BotaoPesquisar}"
									TabIndex="3" Click="btnPesquisar_Click"/>
                <Controls:SinacorButton	x:Name="btnLimpar" HorizontalAlignment="Left"
									VerticalAlignment="Top"
									Margin="950,23,0,0"
									ToolTip="{DynamicResource Bovespa.Contabil.Tooltip.BotaoNovaPesquisa}"
									TabIndex="4"
									Icon="IconButtonNewSearch" Click="btnLimpar_Click"/>
            </Grid>
        </Controls:SinacorExpander>
        <Controls:SinacorExpander	Header="{DynamicResource Bovespa.Contabil.Label.ExpanderHistContabil}"
									Grid.Row="2"
									TabIndex="7" IsExpanded="True" AllowExpand="False">
            <Grid>
                <Controls:SinacorDataGrid x:Name="dtgHistorico" AllowDelete="False" ItemsSource="{Binding ListaHistorico}"	TabIndex="6" MouseDoubleClick="dtgHistorico_MouseDoubleClick" ConfirmSelection="dtgHistorico_ConfirmSelection" >

                    <Controls:SinacorDataGrid.Columns>
                        <Controls:Column Name="Codigo" DisplayMemberPath="Codigo"
                                         Title="Bovespa.Contabil.Label.PesquisaHistCCCodigo"
                                         IsRequired="False"
                                         AllowInsert="False"
                                         AllowUpdate="False" 
                                         HorizontalCellAlignment="Right"
										 Width="55">
                            <Controls:Column.CellTemplate>
                                <DataTemplate>
                                    <StackPanel Orientation="Horizontal">
                                        <Controls:SinacorLabel Content="{Binding Codigo}"/>
                                        <Controls:SinacorLabel Content="-"/>
                                        <Controls:SinacorLabel Content="{Binding Digito}"/>
                                    </StackPanel>
                                </DataTemplate>
                            </Controls:Column.CellTemplate>
                        </Controls:Column>

                        <Controls:Column Name="Descricao" DisplayMemberPath="Descricao" 
                                         Title="Bovespa.Contabil.Label.PesquisaDescricao"
                                         IsRequired="False"
                                         AllowInsert="False"
                                         AllowUpdate="False" 
                                         HorizontalCellAlignment="Left"
										 AutoAdjustWidthToContent="False"
										 Width="525"/>

                    </Controls:SinacorDataGrid.Columns>
                </Controls:SinacorDataGrid>

            </Grid>
        </Controls:SinacorExpander>
    </Controls:SinacorExpanderContainer>
</Controls:SinacorWindow>